home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d1
/
bnchutil.arc
/
SD.DOC
< prev
next >
Wrap
Text File
|
1991-04-30
|
94KB
|
2,032 lines
------------------------------------------------------------------------
SD: IBM-PC Sorted Directory Utility V6.1
Copyright (C) 1986-89 By John F. Stetson
SHAREWARE - All Rights Reserved
------------------------------------------------------------------------
Contents
------------------------------------------------------------------------
1.0 INTRODUCTION
1.1 Program Requirements
1.2 Design Philosophy
1.3 Distribution Files
1.4 Installation
2.0 OVERVIEW
2.1 Modes of Operation
2.2 Command Line Syntax
2.3 Controlling Program Output
2.4 Examples of Use
3.0 FILE SELECTION AND SORTING
3.1 File Selection By Attribute
3.2 File Selection By Date
3.3 ARC and ZIP File Processing
3.4 Global Subdirectory Processing
3.5 Sort Field Selection Switches
4.0 OUTPUT FORMAT CONTROL
4.1 Output Mode Switches
4.2 Output Toggle Switches
4.3 Filename Column Switches
4.4 EGA and VGA Switches
5.0 SYSTEM INFORMATION SUMMARY
5.1 System Hardware
5.2 System Memory
5.3 Disk Parameters
6.0 SPECIAL ENVIRONMENTS
6.1 Batch File Operation
6.2 Multitasking Environments
6.3 Local Area Networks and OS/2
7.0 CUSTOMIZATION
7.1 Configuring the Program
7.2 Patch Area Format
8.0 APPENDICES
8.1 Error Messages and Return Codes
8.2 Modification History
8.3 Product Support
------------------------------------------------------------------------
1.1 Program Requirements
------------------------------------------------------------------------
This is a user-supported SHAREWARE product. Please see the section
titled Product Support at the end of this document for details.
SD.COM is a Sorted Directory utility program which operates on IBM-PC
compatible computer systems using the IBM PC-DOS or Microsoft MS-DOS
Operating System Version 2.0 or higher.
SDR.COM is the memory resident (TSR) version of the program. Since some
users may not wish to use this version of the program, its documentation
has been placed in a separate file.
This version of the program requires about 15Kb of disk space and
about 32-64Kb of memory during execution, depending on the number
of files and directories being processed.
Current program limitations are about 625 total directories when
processing global directories, about 1550 files per directory, and about
1350 files per ARC or ZIP file, assuming 64Kb of memory is available.
File sizes up to 100Mb and disk sizes up to 1000Mb are fully supported.
Support is provided for IBM-PC compatible MDA, CGA, MCGA, EGA, and VGA
video adaptors and monitors.
------------------------------------------------------------------------
1.2 Design Philosophy
------------------------------------------------------------------------
SD provides more information than the resident DOS DIR command about the
files on a disk, and allows the user to select, sort, format, and
display the information in a variety of ways. This is accomplished by
specifying a pattern name to select the desired files and by specifying
any of a variety of command line "switches" which allow you to modify
the behavior of the program. The switch names have been designed using
letters, as much as possible, so that it is easier to associate the
function of a switch with its name. In addition, the default switch
values have been carefully chosen to reflect their most common use.
Although the program is relatively small, it is possible to use it in an
almost infinite variety of ways by using the switches in different
combinations. A significant amount of effort has gone into optimizing
the performance of the program, due to the number of times it is
typically used. The program is designed to be as transparent as
possible in normal operation, and does not impose itself between the
user and the operating system. This allows both novice and
experienced users to use it in the way that best meets their needs.
As a default, the program writes output directly to video display memory
which results in noticeably faster output than that possible with DOS.
Output can still be redirected to an output device or file by specifying
the standard DOS redirection symbol (>) on the DOS command line.
Maximum possible use is made of the horizontal dimension of the screen
to minimize the loss of previously displayed data by screen scrolling.
Support is provided for a variety of file selection attributes.
Support is provided for a variety of screen display formats with varying
amounts of detailed file information displayed.
A variety of user customizable command line switches and screen field
display colors are also supported.
Every effort has been made to keep the size of the program to a minimum,
for efficient use on systems having floppy disks. However, many of the
capabilities of both DOS and this program are only fully realized when
using large hard (fixed) disks with hierarchical directory structures
to organize files.
Two of the most valuable resources in a computer system are memory and
disk storage. Many applications make little or no attempt to use these
resources efficiently. Not only does this program attempt to provide
many useful (and hopefully frequently used) capabilities in an efficient
package, but it can be used to manage the system memory and disk space
so that they are used to best advantage.
------------------------------------------------------------------------
1.3 Distribution Files
------------------------------------------------------------------------
The SD program and associated files are distributed in the form of an
Archive file called SD61.ARC or SD61.ZIP. This is done to save disk
space and time when transferring files over Computer Bulletin Board
systems and to insure the integrity of the files. You will need a
utility program which is capable of extracting the files from the
distribution file. These types of programs are normally available from
most Computer Bulletin Board systems or Software Libraries.
The distribution file contains the following files:
SD .COM - Executable File for SD - Sorted Directory Utility
SD .DOC - Documentation File for SD
SD .PIF - Microsoft Windows PIF File for SD
SDB .BAT - Batch File - Browse SD Output Using LIST Program
SDD .BAT - Batch File - Execute SD Commands for Multiple Drives
SDM .BAT - Batch File - Execute SD with Multiple Command Parameters
SDR .COM - Executable File for SDR - Memory Resident Version of SD
SDR .DOC - Documentation File for SDR
VSN .COM - Executable File for VSN - Volume Serial Number Utility
VSN .DOC - Documentation File for VSN
DEMO .BAT - Batch File Demonstrating the SD Program
DEMO2 .BAT - Batch File Demonstrating Related Products
DEMO3-6 .COM - Executable Files Called By DEMO2.BAT
ORDER .FRM - Order and Registration Form
SITE .FRM - Site License Agreement Form
The following files are also provided when you register SD:
SDC .EXE - Executable File for SDC - Configuration Program
SDC .DOC - Documentation File for SDC
The following source code files are also available separately:
SD .ASM - Assembly Language Source File for SD
SDR .ASM - Assembly Language Source File for SDR
VSN .ASM - Assembly Language Source File for VSN
SDC .BAS - BASIC Language Source File for SDC
------------------------------------------------------------------------
1.4 Installation
------------------------------------------------------------------------
Copy the .BAT and .COM files from the distribution file to the root
directory of the system boot disk (normally C:\) or to another directory
of your choice which is specified in the DOS PATH command in the file
AUTOEXEC.BAT.
The best way to quickly familiarize yourself with the features and
capabilities of SD is to run the DEMO.BAT file. For best results, copy
the DEMO.BAT file to the root directory of the system boot disk, make
sure this is the default directory (type CD C:\), and type the command:
DEMO
You can optionally specify a target drive and/or directory for the files
to be displayed. For example:
DEMO D: or DEMO D:\BIGDIR
Only the files in the target directory and its subdirectories will be
processed, so it is best to specify the root directory of the drive in
order to be able to access a large number of files. The demonstration
is designed to be run with a copy of the distributed SD.COM file, before
any program defaults are changed by the user. This demonstration simply
displays information about the computer system and the files on the
selected disk; it does not write anything to the disk.
Once you are familiar with SD, you may wish to run the DEMO2.BAT file
for a quick demonstration of several related products. See the
section titled Product Support for additional information.
------------------------------------------------------------------------
2.1 Modes of Operation
------------------------------------------------------------------------
SD is a versatile program that can be used in a variety of ways:
The most common use is to simply display information about files (and
subdirectories) in a single (usually the current) directory. Most of
the sort field switches are used in this mode.
The program can be used to display detailed information about the
system hardware configuration, the availability and current use of
different kinds of system memory and fundamental disk characteristics.
The /i switch is used in this mode.
The program can be used to search or scan all (or a subset) of the
ARC and/or ZIP files on a disk for one or more files which meet the
specified criteria (file name pattern or age). This processing makes
effective use of ARC and ZIP compressed files by allowing easy access to
ARC and ZIP directories. The /a and /z switches are used in this mode.
The program can be used to search or scan all (or a subset) of the
directories on a disk for one or more files or directories which meet
the specified criteria (file name pattern, file attributes, or age).
The /g switch is used in this mode.
The program can be used to create an output file by redirecting console
output which may be subsequently used as input to another program. The
/r switch can be used in this mode, but is optional since the program
will automatically detect the use of DOS command line redirection.
------------------------------------------------------------------------
2.2 Command Line Syntax
------------------------------------------------------------------------
The complete form of the DOS command line to run the program is:
D>sd [drive][path][filespec] [/switches] [>[>]device/file]
In most cases, only one or two parameters are specified, so the command
syntax isn't as formidable as it may appear at first. Each of the
command line parameters is optional (as the [] characters indicate) and
may be used together in any combination or order. Spaces may also be
freely used at any point to improve readability. The various command
line parameters are described below:
[drive]
This parameter specifies the name of the disk drive to be processed.
Typical drive letters are A: or B: for floppy disks and C: for a hard
disk. RAM (memory) disks implemented via device drivers may also be
specified, as can other types of disks, such as CD-ROM drives or logical
Network drives. If no drive letter is specified, the currently logged-in
drive (shown in the DOS prompt) is used.
[path]
This parameter specifies the path through the hierarchical directory
structure to the desired directory which contains the files to be
processed. The general form of the path parameter is shown below:
[\][directory][\directory]...[\directory][\]
The path name may simply be the name of the root directory (\), or the
name of a subdirectory in the root directory. The standard DOS . and ..
directory names may be used to refer to the current and parent
directories, respectively. If a path is not specified, the current
directory on the specified disk drive is used. If the path name is the
first parameter on the DOS command line after the program name, then
they must be separated by a space.
[filespec]
This parameter specifies which file names are to be selected for
processing from the previously specified directory (if any). A complete
(unambiguous) file name may be specified, or an ambiguous file name,
containing "wildcard" characters (? or *) may be specified to select
several files. Either the file name (first 8 characters) or the file
extension (last 3 characters) or both may be completely omitted. In
these cases, wildcard characters are automatically used to match all
possible file names in the selected directory. You may specify leading
characters of the file names you wish to match, omitting the trailing
characters of the name, the period delimiter, and the file extension. In
this respect, SD processes file specifications differently than DIR.
For example: SD ABC is equivalent to DIR ABC*.*
If you specify a filespec which exactly matches a subdirectory name,
then only the files in the subdirectory will be selected. If you wish
to select other files in the parent directory with leading characters
the same as the subdirectory name, you must use the following notation:
Instead of SD ABC, use SD ABC*, where ABC is a subdirectory name.
[/switches]
This parameter specifies one or more "switch" or option values which
modify the operation of the command. All switches are optional and may
be specified before the drive, path, and filespec, after them, or both
before and after. Each switch has a default value, which has been
carefully selected to represent the most frequently used option, for
most users. Specifying a switch overrides or "toggles" the current or
default value of that command option. The SDC program can be used
to change the default values of the switches, or they can be patched
using the standard DOS DEBUG utility program. If you find that you
frequently wish to override a default switch value, you can permanently
change the default switch value by using either of these methods.
If a default switch value is overridden, specification of that option
will toggle the option back to its original state, if appropriate.
Detailed descriptions of all switches are given below.
[>[>]device/file]
This parameter is actually a standard feature of DOS called redirection
of output to the "standard output" (STDOUT) device. This allows the
console output generated by the program to be transmitted to either
another device (usually the printer device: PRN), or to a disk file. By
redirecting the output of the command to a file, you can later use the
file as input to a word processor, disk catalog system, etc. If this
parameter is specified, the program will automatically detect this and
will use standard DOS console output services rather than writing
directly to video display memory.
------------------------------------------------------------------------
2.3 Controlling Program Output
------------------------------------------------------------------------
Unlike most programs, you can't type ahead while the program is running.
This is due to the need to monitor the keyboard in order to pause the
screen output. If you wish to begin typing a new command, simply press
ESCAPE or CTRL-C to terminate the output, and then type the next
command. ESCAPE causes the program to terminate immediately, whereas
CTRL-C closes the file box and displays the disk space totals line.
Console output may be paused by pressing any other key and may be
restarted in two different ways. If the RETURN or PAGE-DOWN key is
pressed, screen output resumes until the either the screen fills or the
output finishes. If any other key is pressed, only a single line of
additional screen output is displayed. This allows you to easily
control the displayed output so as to minimize the loss of existing
screen data by scrolling. The Space Bar or the DOWN-ARROW key is
recommended for use in single line scrolling mode.
As an experiment, try typing the command SD, immediately followed by
two carriage returns. You will see only one line of output and can use
the space bar to display additional lines. When you have seen enough,
press the ESCAPE key to terminate the program. By carefully selecting
the proper switch values and using this technique, you can minimize the
loss of previously displayed information on the display screen.
If /q is specified, the console output isn't paused when the screen
fills. This is necessary when redirecting output to a file or device,
or when you wish to browse through large amounts of output.
Output lines which are longer than 80 characters are truncated at column
80 when writing to video display memory, but not when redirecting output
to a file or device.
Program output may be sent to a printer in several different ways:
You can use the technique of "echoing" console output to the printer by
pressing either Control-P or Control-Print-Screen to start and stop.
You can use the technique of printing the entire contents of the screen
by pressing Shift-Print-Screen.
You can use the technique of redirecting all program output to the
printer by using the DOS command line redirection symbol and the printer
device name: SD ... >PRN
------------------------------------------------------------------------
2.4 Examples of Use
------------------------------------------------------------------------
A>sd
Display the current directory of drive A.
C>sd /?
Display program help information.
A>sd c:/i/m
Measure CPU performance and display system information summary including
information for the disk in drive C.
B>sd/f/6
Display the current directory of drive B, sorted by file name, using the
six column format (file names only).
D>sd c:\/ss/1
Display only the system files in the root directory of drive C, using
the one column output format.
C>sd /j
Display the currently configured screen colors.
A>sd c:\/sd
Display all of the subdirectories in the root directory of drive C.
A>sd /lp/sf c:\ >files.dat
Create a file called "a:files.dat" which contains a sorted list of all
files with path names (no directories) in the root directory of drive C.
A>sd .asm/b-
Display all files having an extension of "asm" in the current directory
of drive A and sort the output by descending file size.
B>sd \/n/4/y
Select all files in the root directory of drive B, do not sort the file
entries, display the output using the four column format and restore
the original console screen when done.
C>sd \/35
Display all of the files in the root directory of drive C using 35 lines
on the screen with an EGA or VGA.
C>sd \/u/50/w
Display all of the files in the root directory of drive C in upper case
using 50 lines on the screen with an EGA or VGA and automatically reset
to 25 lines when done.
B>sd temp.* >c:temp.dir
Select all files having a name of "temp" in the current directory of
drive B, and redirect the console output to file "c:temp.dir".
B>sd/1 c:\*.com >>c:temp.dir
Select all files with an extension of "com" in the root directory of
drive C, format using one output column, and redirect the console
output, appending to the file "c:temp.dir".
D>sd a:/v/p/1
Display the disk volume label and all file information for the current
directory of drive A without a column title line.
B>sd e:/k/u
Display the current directory of drive E, rounding the space values to
Kilobytes and displaying the file names in upper case.
C>sd /h/2
Display all files and directories in the current directory on drive C
sorted and displayed from left to right, using the two column format.
A>sd t/e/k/q
Select all files in the current directory of drive A whose names begin
with "t", erase the screen before displaying output, display file size
and disk space values in Kilobytes and do not pause the console output.
C>sd \
Display all files in the root directory of drive C sorted by file
extension and by file name using the two column format.
B>sd temp
If temp is an existing subdirectory in the current directory of drive B,
then select all of the files in that directory. Otherwise, select all
files in the current directory of drive B whose names begin with "temp".
B>sd temp*
Display all directories and files in the current directory of drive B
whose names begin with "temp".
A>sd ../sar
Display all files in the parent directory of the current directory of
drive A with either the archive or read/only attribute.
A>sd c:/d/@+30
Display all files in the current directory of drive C which were created
during the past month sorted by date and time, using two output columns.
C>sd \/v/g/1
Display the disk volume label and all information for all files in all
directories of drive C.
C>sd \/gt
Display grand totals information only for all directories on drive C.
C>sd \/g/t/s
Display totals information only for all directories on drive C.
C>sd d:\test/gn
Display information for files and directories at and below the "test"
directory level of drive D without sorting directory names.
A>sd c:\*.exe/g
Display information for all .exe files in all directories on drive C.
C>sd /sn
Display all files without any attributes on drive C.
A>sd c:\/g/sd
Display all directory names on drive C.
B>sd ..\*.a?m/d+/1
Display all files in the parent directory of the current directory of
drive B whose extensions begin with "a" and end with "m" and sort the
output by ascending date and time using the one column output format.
C>sd /a/1
Display all files in all ARC files in the current directory of drive C
using the one column format.
C>sd /z:*.com/4
Display all .com files in all ZIP files in the current directory of
drive C using the 4 column format.
C>sd abc/a/@+365
Display all files less than one year old in all ARC files whose names
begin with "abc" in the current directory of drive C in 2 column format.
C>sd \/az+/gt
Display grand totals information only for all files in all directories
and all files in all ARC and ZIP files in all directories of drive C.
C>sd/v/1 b:\dir1\dir2\dir3\*.doc/d >prn
Select all files having an extension of "doc" in the directory
"\dir1\dir2\dir3" of drive B. Sort the output by date and time. Use
the one column output format and include the disk volume label.
Redirect the console output to the printer.
A>sd/r/q b: (Type Control-P/RETURN)
(console output is duplicated on the printer)
A> (Type Control-P/RETURN)
Display the current directory of drive B and duplicate the console
output on the printer.
------------------------------------------------------------------------
3.1 File Selection By Attribute
------------------------------------------------------------------------
Syntax: /s[attr-switch]...[attr-switch]
/s - Select all files and directories
/sd - Select Directories only (no files)
/sf - Select Files only (no directories)
/ss - Select files with the System attribute
/sh - Select files with the Hidden attribute
/sr - Select files with the Read/Only attribute
/sa - Select files with the Archive attribute
/sn - Select files with No attributes
These switches are used to further restrict which files are selected
(in addition to any filespec) based on the attributes of the files.
As a default, the /s switch is configured ON. This means that all files
(including Hidden and System files) are selected as a default. If you
prefer to not see these files (like DIR) unless you type /s, set the /s
switch OFF using the SDC program or DEBUG.
If /sd is specified, all and only the subdirectories in the specified
directory are selected, including the current (.) and parent (..).
If /sf is specified, all files (regardless of attribute) and none of the
directories are selected.
If /sn is specified, all and only the files with none of the four
possible file attributes are selected. This switch is mutually
exclusive with the other /s switches.
If a /ss, /sh, /sr, or /sa switch is specified by itself, all and only
the files with the specified attribute are selected. These switches may
also be combined in any order and the intervening /s switch(es) omitted.
For example: SD C:\DIR/SA/SR is equivalent to SD C:\DIR/SAR
When multiple /s switches are specified, the effect is "additive"; i.e.
for the example above, all files with either the Archive or Read/Only
attribute will be selected from the specified directory.
Specification of any /s switch(es) other than /sd causes an additional
'totals' line to be displayed which summarizes the number of files which
have each of the requested attributes. If files with the Archive
attribute are selected, the percent of files with this attribute is also
displayed. This provides an indication of the need to back up files on
a hard disk.
Since separate colors are used to identify System and Hidden files from
normal files, it is possible to permanently configure the /s switch ON
without losing the ability to distinguish the different file types.
One difference between SD and CHKDSK is that CHKDSK considers a disk
volume label to be a "hidden file", whereas SD does not.
------------------------------------------------------------------------
3.2 File Selection By Date
------------------------------------------------------------------------
Syntax: /@[+/-][days][+/-]
The /@ switch is used to select files based on their age (the date the
file was created or last updated). Since dates are specified relative to
the current system date (normally set by the DATE command or real time
clock at boot time), it is essential that the system date be set
correctly in order for this feature to work properly.
Files may be selected which are exactly the specified number of days
old, or either newer (+) or older (-) than the specified number of days.
The number of days specified may range from 0 to 9999, syntactically,
but cannot be so large as to pre-date January 1, 1980, which is when the
universe was created (according to DOS!).
Think of the date specification process in two steps: go back the
specified number of days and then find the files written before (-), on,
or after (+) that date.
For example:
/@ select files written today (days=0)
/@1+ select files written during last 2 days
/@7 select files written exactly one week ago
/@+30 select files written during the past month
/@-365 select files written more than a year ago
The +/- may be specified either before or after the number of days.
Regardless of the default sort type, specifying the /@ switch will cause
the /d switch to be set automatically. If you wish to specify a
different sort switch, you must specify it after the /@ switch. If the
number of filename columns is not already set to 1, specifying the /@
switch will cause the /2 switch to be set automatically. If you wish to
specify a different number of filename columns, you must specify it
after the /@ switch.
------------------------------------------------------------------------
3.3 ARC and ZIP File Processing
------------------------------------------------------------------------
Syntax: /a or /z or /az or /za [+][:filespec]
These switches request special processing for compressed Archive files
instead of OR in addition to normal file processing. These files are
created by utility programs such as ARC.EXE and PKZIP.EXE. Although the
format of ARC and ZIP files differs, the use of the /a and /z switches
is the same, and file information is displayed using the same format.
The /a switch causes all .ARC, .PKA, and .PAK files to be processed.
The /z switch causes all .ZIP files to be processed. Specifying either
/a/z, /az, or /za will cause BOTH types of files to be processed. To
simplify the discussion below, only the /a switch is explained. The
same information applies to the use of the /z switch, either alone or
when used together with the /a switch. All other program switches
operate as usual with the exception of those noted below.
In the simplest case (/a specified), all files in the specified
directory with extensions of .ARC are automatically processed.
Although the .ARC file type is assumed, any other file type (such as
.PAK or .PKA) may be explicitly specified to select the desired files.
Each Archive file is opened, the directory entries are read and saved,
and the file is closed. Information for each of the files inside the
selected Archive file is then displayed. This process repeats until all
of the selected Archive files have been processed. The Archive files
are processed in the order they are found in the directory and are not
sorted. Entries inside each selected Archive file are sorted and
displayed in the usual way except that some additional information is
displayed if the /1 switch is specified.
The information displayed for each file in an Archive file includes:
Filename, Original Length, Storage Method, Packing Percent, Packed Size,
Date, Time, and CRC code. After the entries in each Archive file are
displayed, a totals line is displayed which summarizes this information
for the Archive file as a whole. After all Archive files have been
processed, a grand totals line is displayed which summarizes the
information for all of the selected Archive files.
If a primary file specification is used with /a (SD ABC/A), it is used
to select a subset of the available ARC files. If a secondary file
specification is used (SD /A:ABC), it is used to select a subset of
the available files INSIDE the selected ARC files. The /@ switch may
also be used to select files INSIDE ARC files by the age of the files.
If /a+ is specified, normal file processing occurs first, followed by
Archive file processing for each of the selected ARC files. This process
can also be applied to all directories on a disk by using the /g switch.
Processing for /a may take considerable time if many ARC files are
present and the disk space is heavily fragmented. In this case, you may
wish to specify the /q switch and control the console output manually.
The /s switches are not applicable to Archive file entries since no file
attribute information is maintained inside ARC files. The /c switch
is not particularly useful either since it sorts by the file CRC codes!
Nested ARC files (ARC files inside ARC files) cannot be processed since
this would require the full extraction code for the ARC compression
algorithms to be included in this program, which is not appropriate.
The following limitations apply to ZIP file processing:
1) Only the least significant four hexadecimal digits of the file
CRC codes are displayed, due to space limitations.
2) Embedded path names stored in ZIP files are not displayed, due
to space limitations.
3) ZIP files which span multiple disks are not supported.
ARC and ZIP files have become a standard means of transferring DOS disk
files across Computer Bulletin Board systems since they significantly
reduce the transfer time, allow multiple files to be combined into a
single file, insure the integrity of the files by storing and checking
CRC codes, and preserve the original file dates, times and sizes. They
are also useful for long term disk storage since they reduce the number
of floppy disks needed to store data. It is therefore highly desirable
to be able to display the directories of these files in an efficient and
flexible manner. The integration of ARC and ZIP file processing with
normal directory processing in this program allows you to take full
advantage of the benefits inherent in compressed Archive files.
------------------------------------------------------------------------
3.4 Global Subdirectory Processing
------------------------------------------------------------------------
Syntax: /g or /gn or /gt
The /g switch requests global subdirectory processing. All other
switches operate as usual. After the specified target directory
(usually, but not necessarily, a root directory) is processed, all
subdirectories below that directory are processed. The directories are
sorted into alphabetic order unless /gn is specified when they are not
sorted and are processed in the order they are found on the disk.
After all directories have been processed, a grand totals line for all
of the directories and files is displayed, followed by a grand totals
line for file attributes (if a /s switch was specified). Specifying the
/gt switch suppresses the totals lines for individual directories and
only displays the grand totals.
If the current directory on the target drive is not the root directory,
you must explicitly specify it (\), if you wish to process all of the
directories on that drive: SD \/G ...
Processing for /g may take considerable time if many directories are
present and the disk space is heavily fragmented. In this case, you may
wish to specify the /q switch and control the console output manually.
The /g switch has a variety of uses. It can be used to display a summary
of the total number of directories and files on a disk similar to the
CHKDSK command if /gt is specified. Somewhat more information for each
individual directory is displayed if /g/t is specified.
It can be used to locate any and all occurrences of a file anywhere on a
disk with a complex directory structure by simply specifying a filename.
If no matching files are found, the displayed path name is that of the
last directory which was searched for the file.
Another interesting use is to specify the /sd switch, which will display
all of the directories on the disk below the specified directory.
------------------------------------------------------------------------
3.5 Sort Field Selection Switches
------------------------------------------------------------------------
Syntax: /sort-switch[+/-]
/f - Sort by (1) File Name and (2) extension
/x - Sort by (1) file Extension and (2) name
/b - Sort by file size in Bytes
/d - Sort by (1) file Date and (2) time
/c - Sort by file Cluster number or ARC/ZIP CRC
/n - No sort - display entries in directory order
These switches specify which fields are to be used as sort "keys" when
formatting the output information. These switches are all mutually
exclusive; i.e. only one sort switch should be specified. If no sort
switch is specified, the default is by file extension and name (/x).
Sort switches may be optionally followed by a + for an ascending sort or
a - for a descending sort. The default sort direction is ascending for
all sort switches except /d, which is descending (so the newer files
appear first). The + and - options are not meaningful for the /n switch.
The /f switch simply sorts the selected directory entries by file name
and extension. Any "strange" file names beginning with unusual special
characters will tend to collect at the beginning and end of the list,
where they can be easily identified.
The /x switch is helpful in identifying which, if any, files have
"strange" file name extensions. Since most standard files have one of
only a few possible types (extensions), such as .BAT, .COM, .EXE, etc.
using this switch will separate out any non-standard file names.
The /b switch is used to find either the smallest or largest files on a
disk, or to discover which file(s) have sizes which lie in a given
range. This can be helpful when it is known that a file of a given
size is missing from a disk, and it is desired to find its identity by
examining the contents of another disk which does contain the file.
The /d switch is a frequently used sorting option, especially when
combined with the /1 or /2 switch. This allows either the newest or
oldest files on a disk to be easily identified. Of course, the validity
of this information is once again dependent on the correct setting of
the system date at the time the files were written. If the number of
filename columns is not already set to 1, specifying the /d switch will
cause the /2 switch to be set automatically. If you wish to specify a
different number of filename columns, you must specify it after the /d
switch.
The /c switch sorts the file entries by the first or starting cluster
number allocated to the file. This is simply the absolute location on
the disk where the file begins. Although not used very frequently,
this switch can be used to determine the actual order of the files on a
disk, which is independent of their order in the disk's directory,
especially on a disk whose space has become "fragmented" by the creation
and deletion of many files with differing sizes. Regardless of the
default value for the number of filename columns, specifying the /c
switch will cause the /1 switch to be set automatically. If you wish to
specify a different number of filename columns, you must specify it
after the /c switch. For ARC or ZIP files, /c causes the files to be
sorted by the file CRC codes which is not very useful.
The /n switch bypasses the sort process with the result that the file
entries are displayed in the order they occur in the disk directory.
This is helpful when examining a bootable disk to insure that the order
of files is optimal (in the order they are needed during the boot
sequence, and by frequency of use after boot-up). This is the same
order of file names as that displayed by the DIR command.
------------------------------------------------------------------------
4.1 Output Mode Switches
------------------------------------------------------------------------
Syntax: /output-switch ... /output-switch
/? - Display program help information
/i - Display system Information summary
/j - Just display configured screen colors
/l - List file names and (p)ath names only
/r - Redirect output to a device or file (optional)
/t - Display only the Totals output lines
The /? switch requests that a help screen be displayed which summarizes
the command line syntax used to invoke the program and switch meanings.
The /? switch output may be redirected to a file as follows: SD /? >FILE
The /i switch requests that a screen be displayed which summarizes the
system hardware configuration and memory and disk characteristics. See
the section titled System Information Summary for details.
The /j switch requests that a summary of the configured screen colors
be displayed. This switch is useful when you can't remember what the
color values are for a specific type of file attribute or screen area.
The /l switch requests that a list of file names (only) be generated.
All other output (file information and totals lines) is suppressed.
This switch is normally used with the /sf switch (to suppress any
directories), and the /r switch to redirect the output to a file for
processing by another program. The filename column switches are ignored
(/1 is assumed) if they are specified with the /l switch. Since any
embedded spaces are removed, the file names are ready to be operated on
by copy commands which might be generated automatically by another
program. Specifying the /lp (path name) option causes the file names to
be prefixed with their path names. This can be useful when another
program is to subsequently process the file name list from another
directory. /l is mutually exclusive with the /t and /gt switches.
The /r switch requests that console output be written using DOS
services, rather than directly to video display memory for higher speed.
Although this slows down the output and suppresses the screen colors,
this is necessary when the need arises to redirect the output to a file
or a device (printer) for subsequent processing. /r is also used to run
the program in a window with a multitasking environment (see below).
If /r is specified, it should be the first parameter on the command line
after the command name, so that any error messages which are generated
for subsequent parameters can be redirected. Although the program will
usually be able to automatically detect the fact that output is being
redirected, you can always force redirection to occur by explicitly
specifying the /r switch (with the /q switch).
You may wish to place the output file on a different drive or directory
than the one being processed or the output file may be included in the
directory list as a zero byte file. For example: SD A: >C:\TEMP.DIR
The /t switch suppresses the display of detailed information for
individual files and directories and only displays the directory,
file attribute (see the /s switch) and disk space totals lines.
The directory totals line includes the target directory path (if the /v
switch isn't specified), the number of subdirectories, the number of
files selected, the total number of bytes and clusters in the selected
files, and the percent of space used in the clusters allocated to the
selected files. This last value provides an indication of how
efficiently disk space is being utilized for the selected files and
depends on the number of files selected, the file sizes and the disk
cluster size. If a long path name is selected, it is displayed on a
separate output line to prevent truncation of the other information.
The disk space totals line includes the space used, percent used, space
free, total space on the disk, and the current date and time.
The /t switch is used when you wish to compare the total number or size
of files on two different disks or directories. If a difference is
detected, other switches (such as /b or /d) can be used to determine
which files are missing (or different).
Another difference between SD and DIR is that SD counts directories and
files separately; DIR includes both in its "file" count.
------------------------------------------------------------------------
4.2 Output Toggle Switches
------------------------------------------------------------------------
Syntax: /output-switch ... /output-switch
/e - Erase the screen before displaying output
/h - Display output using Horizontal sequence
/k - Display memory and disk space in Kilobytes
/m - Measure CPU performance for /i switch
/o - Switch between long and short date and time formats
/p - Print column title lines for /1 switch
/q - Quick output (no prompts when the screen fills)
/u - Switch between Upper and Lower case filenames
/v - Display disk Volume label and path at start
/w - Reset the screen to 25 lines at exit
/y - Restore the original screen at exit
These output switches are all "toggles". This means that specifying the
switch on the command line toggles the switch value to the opposite
state of the default value (either ON or OFF). For example, the value
of the /k switch is normally OFF. Specifying /k on the command line
will cause space values to be shown in Kilobytes, rather than Bytes.
However, if /k is configured to be ON as a default, specifying it on the
command line will cause space values to be shown in Bytes rather than
Kilobytes. These switches may be used together and with other switches
in many different combinations.
The /e switch causes the display screen to be cleared before any output
is displayed. The screen is cleared using the current number of screen
lines (rows), which may be different from the standard 25 lines if an
EGA or VGA adaptor and monitor are being used.
The /h switch causes the file entries to be displayed in horizontal
rather than vertical sequence according to the sort option specified.
This is handy when more than a screen's worth of output is generated, so
that the sequence of file entries is continuous when the screen scrolls.
The /k switch requests that system memory and disk space information be
displayed in units of Kilobytes (1024 bytes), rather than the default
units of bytes. In addition, these values are rounded upward, taking
into account the allocation unit (cluster) size for the specified disk.
System memory values are simply rounded to the next higher Kilobyte. Use
of the /k switch will reveal the actual amount of disk space used by
each file, rather than the normal file size, which may be much less.
Depending on the file size and the number of output columns specified,
the file size value may be displayed in Kilobytes, even if the /k switch
isn't specified, due to space limitations.
The /m switch requests that the system CPU performance be measured and
displayed when the /i switch is also specified. Since this process can
take up to about 10 seconds on an 8088 system, the default is OFF. If
you are using a fast system, you may prefer to configure the value ON.
See the section titled System Information Summary for details.
The /o switch requests that an alternate format be used when displaying
system and file date and time values. Two formats are supported, long
and short. For example, for the long format values: 25-Nov-88 12:55:32,
the equivalent short format would be 11-25-88 12:55p. The advantage of
using the long format is that the month is more readable and times are
displayed in seconds for better accuracy. The advantage of the short
format is that dates are easier to compare when using the /d switch, and
the format is similar to the standard DOS date and time format.
The /p switch requests that a title line be displayed which labels the
individual output columns displayed for the /1 switch. The format of
the displayed information is somewhat different when both the /a and /1
switches are specified. You may wish to turn off the /p switch when
redirecting the program output to a file to be used as input to another
program.
The /q switch suppresses the console reads which normally occur when
output information is about to scroll off the screen. You may wish to
specify this switch when a large amount of output is being generated
(/g or /a used without /t) or when specifying the /r switch.
The /u switch requests that an alternate format be used when displaying
individual filenames. Two formats are supported, upper and lower case.
The lower case format is usually more readable, but this depends on the
video monitor and number of screen lines being used.
The /v switch causes the disk volume label (if any), and the target
path name to be displayed before the information for individual files.
In this case, the path name is not displayed on the first totals line,
which is the normal default. You may wish to avoid using this switch
when you are working with long path names, to prevent truncation of
information on the output line.
The /w switch requests that the number of screen lines be reset to 25
when the program is about to exit in a video mode with more than 25
screen lines when an EGA or VGA adaptor is in use. A necessary side
effect of this is that the program must wait for the user to press a key
just prior to exiting and the screen is cleared. If this switch is
configured ON, you will have to specify /w/y when you wish to use the /y
switch. See the section titled EGA and VGA Switches for additional
information.
The /y switch requests that the program save the contents of the screen
(including the cursor location and size) on entry, and that these be
restored when the program terminates. This requires that the program
wait for the user to press a key just prior to exiting, so that the
final screen output is not prematurely lost. Screen sizes of up to 80
columns by 50 lines for EGA and VGA adaptors are supported. /y may be
ignored if used together with either the /w, /25, /35, /43, or /50
switch since the restored screen size could be incorrect after the video
mode change requested by these other switches.
It is also possible that /y will be ignored if used together with the
/g switch when processing a large number of directories. The directory
buffer size is 2000 bytes which allows up to about 125 16 character
directory names to be processed. If the directory buffer fills, it
automatically expands into the screen save buffer (an additional 8000
bytes), which allows up to a total of about 625 16 character directory
names to be processed.
------------------------------------------------------------------------
4.3 Filename Column Switches
------------------------------------------------------------------------
The /1, /2, /4, and /6 switches specify the number of filename output
columns and, inversely, the amount of file information displayed:
/1 - 1 column - File name, size, clusters allocated, % of space used,
date, time, starting cluster and sector, and attributes
/2 - 2 columns - File name, size, date and time
/4 - 4 columns - File name and size
/6 - 6 columns - File name only
A larger number of columns allows more files to be displayed on the
display screen at one time, at the cost of losing some of the detailed
file information. A smaller number of columns allows more detailed file
information to be displayed, at the cost of only being able to display a
limited number of files. All of these switches are mutually exclusive;
only one should be specified. The default switch is /2.
Subdirectory entries (normally found in the root directory) are shown
with special screen colors, for emphasis. This is especially helpful
when using the /6 switch, since there isn't room for the <Dir> indicator
(directory names may be up to 11 characters long, just like file names).
File name colors indicate the most significant attribute of the file in
the order: System, Hidden, Read-Only, Archive, and Normal.
The file size is normally displayed in bytes, or Kilobytes if the /k
switch is specified. If /2 is specified, file sizes larger than 999,999
bytes are displayed in Kilobytes and if /4 is specified file sizes
larger than 99,999 bytes are displayed in Kilobytes, due to space
limitations. If /1 is specified, the number of clusters which are
allocated to the file and the percent of space actually used are also
displayed.
The date and time the file was last modified are displayed in either
long or short format, depending on the /o switch value. The time a file
was last written is only accurate to a resolution of two seconds; all
values will have an even number of seconds. Files created with early
versions of DOS may not have either a date or time stamp. In this case,
the date and time fields will appear as periods.
If /1 is specified, the starting cluster number and starting logical
sector number for the file are displayed, as are the file attributes:
A - Archive R - Read/Only H - Hidden S - System
------------------------------------------------------------------------
4.4 EGA and VGA Switches
------------------------------------------------------------------------
/25 - Display 25 lines on EGA or VGA monitor
/35 - Display 35 lines on EGA or VGA monitor
/43 - Display 43 lines on EGA or VGA monitor
/50 - Display 50 lines on EGA or VGA monitor
These switches change to the specified number of screen lines (rows)
when an Enhanced Graphics Adaptor (EGA) or Video Graphics Array (VGA)
video adaptor and monitor are in use. The screen is automatically
cleared and the screen remains set to this size when the program
terminates (unless /w is specified when it is reset to 25 lines).
If the number of screen lines has already been set to a value greater
than 25, the program will automatically use the current value. The
use of a monochrome monitor connected to an EGA card is not supported
by these switches.
For an EGA, the native modes are 25 and 43 lines. The 35 and 50 line
modes are synthesized by dynamically creating new EGA fonts. The 35
line mode is more readable than the 43 line mode. The 50 line mode is
rather difficult to read since it is formed by dropping the last scan
line of each character which causes the partial loss of the descenders
of some lower case letters.
For a VGA, the native modes are 25, 43, and 50 lines. The 35 line mode
is synthesized as for the EGA. The 50 line mode is readable, since the
VGA can use 400 vertical scan lines, rather than the 350 of the EGA.
Since versions of DOS prior to 4.0 neither properly recognize nor fully
support all of the operational modes possible with the EGA/VGA BIOS
(43 line mode, for example), you may experience strange results when
using these modes at the DOS command prompt. In particular, ANSI.SYS
does not recognize 43 line mode and may cause the DOS command prompt to
appear on screen line 25, overlaying data previously displayed there.
If you normally use ANSI.SYS (or other equivalent ANSI console device
drivers) with an EGA/VGA monitor, you may wish to configure the /w
switch ON which handles this problem. Turning the option ON will cause
SD to wait for a character to be typed when it is about to exit in an
EGA/VGA video mode with more than 25 screen lines. After a character is
typed, the standard 25 line video mode is reset, the screen is cleared
and the program terminates.
If you are using DOS 4.0 with ANSI.SYS, you MUST specify the new /L ANSI
command line switch if you plan to use more than 25 screen lines. You
may also change the number of screen lines using the MODE command:
DEVICE=ANSI.SYS /L (In CONFIG.SYS)
MODE CON LINES=25 or 43 or 50 (In AUTOEXEC.BAT or at DOS prompt)
SD will decline to execute if the current video mode is other than 2
(80x25 B/W) or 3 (80x25 Color) when a color monitor is in use. The
other standard IBM 40 column text modes and graphics modes are not
supported, but it is rare to encounter these modes other than in BASIC
programs. SD will operate if the current video mode is greater than 19,
for compatibility with high resolution video modes supported by some
non-IBM EGA and VGA video cards.
------------------------------------------------------------------------
5.0 System Information Summary
------------------------------------------------------------------------
The /i switch requests that a screen be displayed which summarizes the
system hardware configuration and memory and disk information. The
information is presented in six boxes. The upper left box summarizes
the system hardware configuration. The upper middle and right boxes
summarize DOS and system memory information. The lower three boxes
summarize the technical information for the specified disk. Other
switches which can be used with the /i switch include /e, /k, /m and /o.
For example, to compare two sets of drive parameters using an EGA/VGA:
D>SD C:/I/50 - display info for drive C: using 50 lines
D>SD D:/I/E - display info for drive D: without clearing screen
Output generated by the /i switch may be redirected as follows:
D>SD C:/I >FILE
------------------------------------------------------------------------
5.1 System Hardware
------------------------------------------------------------------------
PC System Type - The PC System Type Code, followed by the Submodel Type
and BIOS Level for PS/2 systems. Typical system codes are as follows:
Code System Types
---- ------------
FF IBM PC
FE IBM PC-XT, IBM PC-PORTABLE
FD IBM PC-Jr
FC IBM PC-AT, IBM PC-XT/286, IBM PS/2-50,60
FB IBM PC-XT/2
FA IBM PS/2-30
F9 IBM PC-CONVERTIBLE
F8 IBM PS/2-70,80
ROM BIOS Date - The date contained in the ROM BIOS chip which provides
an indication of when the system was manufactured.
Processor Type - The type of CPU chip in the system. Possible types are
8086/8, 80286, or 80386.
Performance - The computing performance of the system CPU relative to
the original IBM PC and PC-XT. The /m switch must be specified or
configured ON. Memory Resident (TSR) programs that intercept the timer
interrupt may make the computed CPU performance value appear
artificially low. You may wish to temporarily rename the CONFIG.SYS and
AUTOEXEC.BAT files, reboot the system and execute the command: SD/I/M
to determine the true CPU performance. Processing time ranges from 10
seconds on 8088 systems to less than 1 second on 80386 systems. You may
wish to run the test several times, since the value may fluctuate.
Typical system performance values are as follows:
System CPU MHz Waits Perf
------ --- --- ----- ----
INTEL 80386 25 0 18.18
COMPAQ 386 80386 20 0 15.15
IBM PS/2-70 80386 20 1 14.08
IBM PS/2-80 80386 16 0 11.36
AT-CLONE 80286 12 1 8.69
IBM PS/2-60 80286 10 1 6.99
AT-CLONE 80286 8 0 5.88
IBM PC-AT 80286 8 1 5.52
AT-CLONE 80286 6 0 4.23
IBM PC-AT 80286 6 1 4.14
IBM PC-XT 8088 4.77 - 1.00
Video Adaptor - The type of Video Display Adaptor currently being used.
Possible types are MDA, CGA, MCGA, EGA or VGA.
Drives (F/H/L) - The number of (F)loppy and (H)ard drives in the system
and the DOS (L)ASTDRIVE value which may be specified in CONFIG.SYS.
Ports (S/P/G) - The number of (S)erial, (P)arallel, and (G)ame ports in
the system. Serial ports are often used for a modem or mouse, parallel
ports are often used for printers and game ports are used for joysticks.
ANSI/CP/Mouse - ANSI indicates whether or not an ANSI Console Device
Driver is installed in the system (via CONFIG.SYS). CP indicates
whether or not an 80x87 math Coprocessor chip is installed in the
system. Mouse Type indicates whether or not a Microsoft Mouse
compatible software device driver is installed in the system.
------------------------------------------------------------------------
5.2 System Memory
------------------------------------------------------------------------
DOS Version - The version of PC-DOS or MS-DOS installed in the system.
Program Memory - The amount of memory used by the program, excluding the
buffer used to hold file entries, which is variable in size.
Environment - The amount of memory currently being used by the DOS
Environment allocated to the program. The DOS SET command is used to
add or delete Environment variables.
DOS Memory - The amount of memory used by the following DOS system
components: Interrupt Vectors in low memory, the Disk BIOS (IBMBIO.COM),
the DOS kernel (IBMDOS.COM), FILES, BUFFERS, and any Device Drivers
specified in CONFIG.SYS, and any memory they allocate.
TSR Memory - The amount of memory used by the resident portion of
COMMAND.COM (at a minimum) and memory allocated to any subsequently
loaded Terminate-and-Stay-Resident type programs (such as SDR.COM).
It also includes any currently free memory blocks which do not reside in
high memory (those previously released by TSR programs).
The DOS and TSR memory values can be very useful in analyzing how the
memory currently being used is allocated and in finding overallocations.
Used Memory - The amount of system memory currently in use.
Free Memory - The amount of system memory currently not in use.
Total Memory - The total amount of system memory (below 640K).
EMS Version - The version of the Lotus-Intel-Microsoft Expanded Memory
Manager installed in the system, if any. EMS allows any PC system to
share paged memory on an EMS memory card between applications. A device
driver must be installed in CONFIG.SYS to use this memory.
EMS Memory Used - The amount of EMS memory currently in use.
EMS Memory Free - The amount of EMS memory currently not in use.
EMS Memory Total - The total amount of EMS memory in the system.
EGA Memory - The amount of video memory installed (up to 256K) on an EGA
or VGA video display adaptor.
XMS Version - The version of the Lotus-Intel-Microsoft Extended Memory
Manager installed in the system, if any. XMS allows a 286 or 386 system
to share Extended memory between applications. A device driver must be
installed in CONFIG.SYS to use this memory.
Free Memory - The amount of Extended memory (above 1Mb) managed by XMS
which is currently available for an 80286 or 80386 system.
Extended - The amount of Extended memory (above 1Mb) which is currently
available for an 80286 or 80386 system.
------------------------------------------------------------------------
5.3 Disk Parameters
------------------------------------------------------------------------
Disk Drive - The name of the target disk drive from A: to Z:. The drive
letter will be followed by one of the following descriptors, if the
drive type can be determined:
NET - Logical Network Drive
BIG - Hard Disk Partition GT 32Mb
HARD - Hard Disk Partition LE 32Mb
5.25" - 5.25" Floppy Drive
3.5" - 3.5" Floppy Drive
OEM Boot Information - The name of the Original Equipment Manufacturer
(OEM) and the version of DOS used to format the disk.
Hidden Sectors - The number of sectors on a hard disk hidden from use by
DOS when processing the current disk partition. This area on the disk
may either contain partition table information, or the data in another
partition, depending on the partitioning scheme used.
Reserved Sectors - The number of sectors reserved at the beginning of
the disk for the boot sector, partition tables, etc.
FATs/EntrySize - The number of File Allocation Tables (FATs) and the
number of Bits Per File Allocation Table Entry for the disk. This value
is 12 for disks formatted prior to DOS 3.0 and either 12 or 16 for disks
formatted with DOS 3.0 or later. DOS uses 16 bit FAT entries if a disk
has 4086 or more data clusters.
Sectors Per FAT - The number of Sectors Per File Allocation Table.
Directory Sector - The logical sector number of the Root Directory for
the disk (or hard disk partition).
Data Sector - The logical sector number of the Data (File) Area on the
disk (or hard disk partition).
Root Directory Size - The maximum number of entries in the disk's Root
Directory.
Total Sectors - The total number of sectors on the disk, including the
Boot sector(s), FAT sectors, Root Directory sectors, and Data sectors.
Sectors Per Track - The number of Sectors Per Track on the disk.
Heads (Sides) - The number of Heads (Sides or Surfaces) for a hard or
floppy disk. Some RAMDISKs may have too many heads for their own good!
Cylinders - The number of Tracks Per Side (Head or Surface) for a floppy
disk or a hard disk partition. This value may be slightly smaller than
the number of physical cylinders for a hard disk partition, due to the
use of some cylinders for partition information, bad sector tables, or
diagnostic purposes. For a hard disk, the total number of cylinders on
the drive is also displayed, but only for the first drive and partition.
Media Byte - The Media Descriptor Byte is used to describe the size and
format of the disk media and is based on the following disk parameters:
Sectors per Track, Heads (Sides), and Cylinders (Tracks Per Side).
Although the Media Byte is used by the BIOS to determine the disk
characteristics in certain cases, not all DOS BIOS implementations
use exactly the same Media Bytes for the same disk types. An example is
the 5.25" 1.2Mb and 3.5" 720Kb disk types which both use media byte F9.
Bytes Per Sector - The number of Bytes Per Sector on the disk.
Sectors Per Cluster - The number of Sectors Per Cluster on the disk.
Bytes Per Cluster - The number of Bytes Per Cluster on the disk.
Volume Serial Number - The Volume Serial Number for the disk. DOS 4.0
places an 8 digit hexadecimal Volume Serial Number in the Boot Sector of
each disk when it is formatted. This value can be used to uniquely
identify a disk since it is different for each disk (unlike disk Volume
Labels which may be the same). The VSN.COM utility provided can be used
to create, change and delete Volume Serial Numbers on disks which are
either formatted or used with any version of DOS. See the VSN.DOC file
for additional information.
Volume Label - The Volume Label for the disk. Volume Labels are created
either when the disk is formatted or when the LABEL command is used.
Create Date - The date when the Volume Label was created.
Create Time - The time when the Volume Label was created.
Used Clusters - The number of Clusters in use on the disk.
Free Clusters - The number of Clusters not in use on the disk.
Total Clusters - The total number of Clusters available on the disk.
This does not include the space used by the Boot Sector, the FATs, or
the Root Directory.
Used Space - The number of Bytes used and the Percent of space used on
the disk.
Free Space - The number of Bytes free and the Percent of space free on
the disk.
Total Space - The total number of Bytes available on the disk. This
does not include the space used by the Boot Sector, the FATs, or the
Root Directory.
Some of the disk information is obtained by reading the Boot Sector of
the disk. If either an error occurs when reading the Boot Sector, or
invalid data is detected, this information will appear as NONE or zeros.
The values affected are the OEM Boot Information through Cylinders and
the Volume Serial Number value.
Standard DOS disk formats and their characteristics are shown below:
Disk Type Size SPT Heads Cyls Media BPC FAT
--------- ---- --- ----- ---- ----- --- ---
5.25" SS 48 TPI 160K 8 1 40 FE 512 12
5.25" SS 48 TPI 180K 9 1 40 FC 512 12
5.25" DS 48 TPI 320K 8 2 40 FF 1024 12
5.25" DS 48 TPI 360K 9 2 40 FD 1024 12
5.25" DS 96 TPI 1.2M 15 2 80 F9 512 12
3.5" DS 135 TPI 720K 9 2 80 F9 1024 12
3.5" DS 135 TPI 1.4M 18 2 80 F0 512 12
PC-XT Hard Disk 10M 17 4 305 F8 4096 12
PC-AT Hard Disk 20M 17 4 611 F8 2048 16
PC-AT Hard Disk 30M 17 5 731 F8 2048 16
------------------------------------------------------------------------
6.1 Batch File Operation
------------------------------------------------------------------------
There are a variety of ways to effectively use SD inside a Batch (.BAT)
file. Three .BAT files are provided as examples: SDB, SDD and SDM. All
three files will display help information if executed without any
command line parameters. They may be modified using any standard text
editor. Once you are familiar with the use of these files, you may wish
to remove the help information at the beginning of each file to keep
them as small as possible. If you are using DOS 3.3 or higher, you may
wish to add an @ character to the ECHO OFF statement to suppress it.
Although you can use almost any valid SD command line with these files,
the following restrictions exist:
1) You must type a space before any command line parameters.
2) Output redirection to a device or file isn't supported.
3) If you don't specify any command line parameters, help information
is displayed. To select the current directory, specify * or ? or
edit the file to remove the help information as described above.
The SDB.BAT file allows you to browse the output generated by SD using
another program (the default is LIST). You may edit the SDB.BAT file
to change the name of the browse program to any program you prefer.
This Batch file is most useful when you are generating many screens of
output and wish to be able to scroll forward and backward through the
output, find character strings, etc. However, there may be a long wait
before the output file is written, so a RAM disk should be used.
An example of using SDB is provided below:
C>sdb /az/1
Browse all information for all files inside all ARC and ZIP files in the
current directory of drive C using the one column output format.
The SDD.BAT Batch file allows you to execute the SD program for multiple
disk drives automatically. This is especially useful when searching for
files which may be on other drives and possibly in other directories or
ARC or ZIP files on other drives. It is also handy when displaying
totals information for one or more directories or ARC or ZIP files on
several drives.
Before using SDD, you must use a text editor to edit the file to select
the disk drives you wish to process (the default is drives C, D, and E).
It is recommended that you only select partitions on hard disks, and
possibly other drives which are not floppy disk drives, but any valid
drive letters may be selected, and in any desired order. Since the
drive letters are contained within the Batch file itself, you must not
specify a specific drive letter on the command line. You may abort the
output at any point by pressing ESCAPE or CTRL-C, so you should order
the drive letters by expected frequency of use. The following two
statements must appear in the Batch file for each drive (d):
sd d:%1%2%3%4%5%6%7%8%9/$
if errorlevel 2 goto end
The last drive is an exception, where the /$ switch must be changed to
/$$ and the if statement should be omitted. The /$ switch tells SD to
provide a pause between successive drives in order to synchronize screen
scrolling. The /$$ switch prevents the last output line from being
overwritten by the DOS command line prompt.
Some typical examples of using SDD are provided below:
D>sdd \abc/g
Display information for all files whose names begin with abc in all
directories on all selected drives.
D>sdd /v/t
Display volume label and totals information for the current directory
on all selected drives.
D>sdd \/gt
Display volume label and grand totals information for all directories
on all selected drives.
The SDM.BAT Batch file allows you to execute the SD program with
multiple command line parameters including drives, paths, file name
specifications and/or switches all on the same command line. SDM
executes the SD program repeatedly, passing a separate command line
parameter to SD each time it is executed. Since each Batch file command
line parameter is separated from another by one or more spaces, you can
group multiple sets of parameters together and separate the groups with
one or more spaces.
Some typical examples of using SDM are provided below:
C>sdm d:\/gt e:\/gt
Display volume label and grand totals information for all directories
on drives D and E.
D>sdm *.bat *.com *.exe
Display information for all .BAT, .COM and .EXE files in the current
directory of drive D.
C>sdm \dir1 \dir3 \dir5 \dir7
Display information for the files in each of the specified directories
on drive C.
------------------------------------------------------------------------
6.2 Multitasking Environments
------------------------------------------------------------------------
There are two different ways to use SD with various multitasking
environments such as Microsoft Windows or DESQview. The first method
is to use SD in its normal mode where it writes output directly to
Video Memory for fast color output. This method will not allow it to
run in a window. The supplied SD.PIF file tells Microsoft Windows that
SD is to be used in this mode. The second method is to make a copy of
SD (SDW) which will have the /r switch turned on as a default. This
will allow it to run inside a window, but more slowly and without color.
Create the SDW file as follows:
D>COPY SD.COM SDW.COM
D>DEBUG SDW.COM
-E114 1
-W
-Q
For Microsoft Windows, copy SD.PIF to SDW.PIF and use the PIFEDIT
utility to edit the SDW.PIF file to indicate that the program does not
directly modify the screen. For DESQview, SDW may be used without being
specially defined. However, you must "add" SD as a DESQview application
program which will tell DESQview that it writes directly to the screen.
------------------------------------------------------------------------
6.3 Local Area Networks and OS/2
------------------------------------------------------------------------
SD and SDR have been tested with IBM, NOVELL, 3-COM, 10NET and other
Local Area Networks for compatibility. Logical Network drives are
detected and identified. When the /i switch is specified, no attempt is
made to read the Boot Sector for Network drives, so not all of the disk
parameter information is available. ARC and ZIP files are opened using
"Deny Write" sharing mode to allow concurrent Read mode access on LANs.
SD and SDR have been tested with several versions of the OS/2 DOS 3.X
"Compatibility Box" with good results. An OS/2 protected mode version
of SD is under development. Please let the author know if you are
interested in this version of the program.
------------------------------------------------------------------------
7.1 Configuring the Program
------------------------------------------------------------------------
The SD program may be configured (using SDC) or patched (using DEBUG) to
change the various program defaults to those you prefer. The SDC
program is preferred over DEBUG since it is much easier and safer to use
and allows you to decide which combination of screen colors you prefer.
It also allows you to judge the effect of your changes by alternately
modifying the SD program and executing the modified program, all without
having to leave the configuration program. Please run the DEMO2.BAT
file to see some examples of SDC program output.
If you are using DEBUG, you will need to refer to the section titled
Patch Area Format to obtain the necessary offsets and data values.
The following example shows how to use DEBUG to patch the SD program:
D>DEBUG SD.COM (Load SD.COM into memory using DEBUG)
-E107 '4' (Change the default number of columns to 4)
-E118 01 (Display the volume label as a default)
-E11C 1E (Change directory colors to Yellow on Blue)
-W (Write the modified file back to disk)
-Q (Exit to DOS from DEBUG)
D>SD (Execute the modified version of SD.COM)
Screen Color Configuration
Although it is possible to configure the SD program using either a color
or monochrome monitor, best results will be obtained if you are using
the target monitor since you will be better able to judge the effect
of different screen color combinations. If you are using a laptop
computer with a LCD display screen, you may wish to set all colors to
White on Black for better readability. You can do this as follows:
D>DEBUG SD.COM (Load SD.COM into memory using DEBUG)
-F11C L 10 7 (Change all screen colors to White on Black)
-W (Write the modified file back to disk)
-Q (Exit to DOS from DEBUG)
D>SD (Execute the modified version of SD.COM)
The foreground and background colors (screen attributes) used for the
following screen fields may be configured:
DIRECTORY COLORS apply to individual subdirectory entries.
SYSTEM COLORS apply to files with the System attribute.
HIDDEN COLORS apply to files with the Hidden attribute, but not the
System attribute.
READ/ONLY COLORS apply to files with the Read/Only attribute, but
neither the System nor Hidden attribute.
ARCHIVE COLORS apply to files with the Archive attribute, but neither
the System, Hidden, or Read/Only attribute.
FILE COLORS apply to files with none of the above mentioned attributes.
ARC FILE COLORS apply to file entries INSIDE ARC files.
ZIP FILE COLORS apply to file entries INSIDE ZIP files.
FILE SIZE COLORS apply to the file size, clusters, and percent of space
used fields.
FILE DATE COLORS apply to the file date and time fields.
FILE MISC COLORS apply to the file starting cluster and sector and file
attribute fields for non-ARC files and file CRC codes for ARC files.
These are also used for empty file box entries and (K)ilobyte symbols.
GRAPHICS COLORS apply to the graphics characters which are used to
form the border lines of boxes.
TITLE COLORS apply to the title fields for the various boxes displayed
by the /? and /i switches.
TEXT COLORS apply to the text strings which precede numeric or string
values in the leading and trailing text lines and to the text in the
boxes displayed for the /? and /i switches.
INFO COLORS apply to the numeric or string values which follow the text
strings in the leading and trailing text lines and to the values in the
boxes displayed for the /i switch.
NORMAL COLORS apply to the trailing characters on each output line, the
new output lines created when the screen is scrolled and the SDR prompt
line. These colors should be set to the standard screen colors used at
the DOS command prompt.
The Graphics, Text, Info and Normal Colors should be selected so that
they all use the same background color (the default is Black), for best
results. The remaining colors should be selected so that they are
sufficiently different from one another to be individually recognizable
and are easily readable on the video monitor being used. Although there
are 2048 possible color combinations, only a few are tolerable for long.
------------------------------------------------------------------------
7.2 Patch Area Format
------------------------------------------------------------------------
The following information is only provided as a reference for those who
need to use DEBUG to change the program defaults; it is not needed to
run the SDC configuration program.
The following data area at the beginning of the SD.COM file may be
modified using the standard DOS DEBUG program. Only the data values
beginning with the Sort Type field should be modified. Only the toggle
switches marked (SDC) should normally be turned ON as a default.
SDC DEBUG Field Default Possible
Offset Offset Description Value Values
------ ------ ----------- ------- --------
01 0100 Jump Instruction - ?? ?? ??
04 0103 Program Type - 1=SD.COM, 2=SDR.COM
05 0104 Program Version - 61H = Version 6.1
06 0105 Sort Type 'X' 'B','C','D','F','X','N'
07 0106 Sort Direction '+' '+','-'
08 0107 Filename Columns '2' '1','2','4','6'
09 0108 Process ARC Files 0 /A = 0,1
10 0109 Erase Console Screen 0 /E = 0,1 (SDC)
11 010A Process Global Dirs 0 /G = 0,1
12 010B Horizontal Sequence 0 /H = 0,1 (SDC)
13 010C System Information 0 /I = 0,1
14 010D Just Display Colors 0 /J = 0,1
15 010E Space in Kilobytes 0 /K = 0,1 (SDC)
16 010F List File Names 0 /L = 0,1
17 0110 Measure CPU Performance 0 /M = 0,1 (SDC)
18 0111 Date/Time Format 0 /O = 0,1 (SDC)
19 0112 Print Title Lines 1 /P = 0,1 (SDC)
20 0113 Quick Output 0 /Q = 0,1 (SDC)
21 0114 Redirected Output 0 /R = 0,1 (SD)
22 0115 System & Hidden Files 1 /S = 0,1 (SDC)
23 0116 Totals Lines Only 0 /T = 0,1
24 0117 Upper/Lower Case 0 /U = 0,1 (SDC)
25 0118 Display Volume Label 0 /V = 0,1 (SDC)
26 0119 Reset to 25 Screen Rows 0 /W = 0,1 (SDC)
27 011A Restore Original Screen 0 /Y = 0,1 (SD)
Suppress Activation Msg 0 /Y = 0,1 (SDR)
28 011B Process ZIP Files 0 /Z = 0,1
29 011C Directory FG/BG Colors 11+16*1 I Cyan on Blue
30 011D System FG/BG Colors 12+16*0 I Red on Black
31 011E Hidden FG/BG Colors 13+16*0 I Magenta on Black
32 011F Read/Only FG/BG Colors 9+16*0 I Blue on Black
33 0120 Archive FG/BG Colors 14+16*0 I Yellow on Black
34 0121 File FG/BG Colors 15+16*0 I White on Black
35 0122 ARC File FG/BG Colors 14+16*1 I Yellow on Blue
36 0123 ZIP File FG/BG Colors 15+16*1 I White on Blue
37 0124 Size FG/BG Colors 11+16*0 I Cyan on Black
38 0125 Date FG/BG Colors 10+16*0 I Green on Black
39 0126 Misc FG/BG Colors 9+16*0 I Blue on Black
40 0127 Graphics FG/BG Colors 4+16*0 Red on Black
41 0128 Title FG/BG Colors 7+16*1 White on Blue
42 0129 Text FG/BG Colors 2+16*0 Green on Black
43 012A Info FG/BG Colors 3+16*0 Cyan on Black
44 012B Normal FG/BG Colors 7+16*0 White on Black
45 012C Directory Mono Attrs 0+16*7 Reverse Video
46 012D System Mono Attrs 9+16*0 I Underlined
47 012E Hidden Mono Attrs 1+16*0 Underlined
48 012F Read/Only Mono Attrs 1+16*0 Underlined
49 0130 Archive Mono Attrs 15+16*0 I Intensified
50 0131 File Mono Attrs 7+16*0 Normal Video
51 0132 ARC File Mono Attrs 15+16*0 I Intensified
52 0133 ZIP File Mono Attrs 15+16*0 I Intensified
53 0134 Size Mono Attrs 7+16*0 Normal Video
54 0135 Date Mono Attrs 7+16*0 Normal Video
55 0136 Misc Mono Attrs 7+16*0 Normal Video
56 0137 Graphics Mono Attrs 7+16*0 Normal Video
57 0138 Title Mono Attrs 0+16*7 Reverse Video
58 0139 Text Mono Attrs 7+16*0 Normal Video
59 013A Info Mono Attrs 15+16*0 I Intensified
60 013B Normal Mono Attrs 7+16*0 Normal Video
61 013C Hot Key Control Code 4 0-15 (SDR)
62 013D Hot Key Scan Code 1 0-255 (SDR)
63 013E Hot Key String CTRL-ESCAPE Keys 16 chars,NULL (SDR)
80 014F Prompt Character 26 0-255 (SDR)
81 0150 Dir Buffer Length 1024 512-4096 (SDR)
83 0152 File Buffer Length 10240 2560-40960 (SDR)
85 0154 Screen Buffer Type 1 1/2=4000/8000 (SDR)
Color Codes
0 = Black 1 = Blue 2 = Green 3 = Cyan
4 = Red 5 = Magenta 6 = Brown 7 = White
SD dynamically selects either the color or monochrome attributes
specified at the offsets in the table above, based on the type of
video display adaptor being used.
Once the desired foreground and background colors (attributes) have been
selected for a screen field, compute the field attribute byte using the
formula: ATTRIBUTE = FCOLOR+16*BCOLOR, where FCOLOR and BCOLOR are the
foreground and background colors (attributes), respectively.
Intensified foreground colors corresponding to the 8 standard colors may
be selected by adding 8 to the foreground color number. For example,
specify foreground color (6+8)=14 to get a foreground Yellow color
instead of the unintensified Brown. The blinking attribute (for
foreground characters) may be selected by adding 8 to the background
color number. However, use of this attribute is not recommended, since
it may be distracting. For a monochrome monitor, selecting Blue on
Black (1+16*0) will cause the screen field to be underlined.
------------------------------------------------------------------------
8.1 Error Messages and Return Codes
------------------------------------------------------------------------
The following error messages are displayed and system return codes set
for various conditions which may arise. An audible tone is generated to
alert the user of the error (for code 2 and above) in case the output is
being redirected. The return codes may be tested using the standard DOS
IF ERRORLEVEL statement in a .BAT file.
0 - One or more matching files were found.
1 - No matching files were found.
2 - Bad switch or ESCAPE or CTRL-C pressed.
3 - Bad drive (doesn't exist or syntax error).
4 - Bad path (doesn't exist or syntax error).
5 - Bad file specification (syntax error).
6 - Bad date (too large or syntax error).
7 - Too many directories (when /g is specified).
8 - Too many files (partial information displayed).
9 - Bad video mode (unsupported video mode).
If there is insufficient space in the directory and/or file buffers to
hold the specified directories and files, as many entries as will fit in
the buffers are processed in the order they are selected.
Other errors which are detected relate to the processing of ARC or ZIP
files. The first type are standard DOS file I/O error codes which can
occur when opening, reading, or closing files. The error message is:
Error <n> on <drive><path><filename>, where <n> is as follows:
1 - Invalid function code 5 - Access denied
2 - File not found 6 - Invalid handle
3 - Path not found 12 - Invalid access value
4 - Too many open files
The only one of these errors which is likely to occur is 4, in which
case you need to increase the FILES specification in CONFIG.SYS.
The second type of error is caused by bad data in the header field for a
file in an ARC or ZIP file, or attempting to process a file with the /a
or /z switch which is not an ARC or ZIP file. The error message is:
Bad header in <drive><path><filename>
------------------------------------------------------------------------
8.2 Modification History
------------------------------------------------------------------------
15-Mar-89 ... V6.1
Process all .ARC, .PKA, and .PAK files for /a switch.
Changed /z switch to /y to restore original screen at exit.
Added /z, /az and /za switches to request processing of .ZIP
files separately from, or in addition to ARC file processing.
Improved processing and display format of long path names.
Use deny write file sharing mode for concurrent access on LAN.
Display all file entries inside double lined boxes.
Display exact file sizes for large files for /1 switch.
Display file sizes GT 99999 in Kilobytes for /4 switch.
Added separate colors for .ZIP files and title lines.
Use file misc colors for empty box entries and 'k' chars.
Changed default file colors to use Black/Blue background.
Close file box and display totals if Control-C is typed.
Scroll screen down one page if Page-Down Key is pressed.
Override automatic redirection test if /r is specified.
Handle directory attributes correctly if /s is specified.
Flush the DOS console input buffer before terminating.
Give error message and set return code if too many files.
Display partial information if too many files or dirs.
Added /gn switch to bypass sort of subdirectory names.
Improved test for the presence of an ANSI console driver.
Allow SD to activate for non-standard video modes GT 13H.
Modified SDR to work correctly in OS/2 compatibility box.
Added /$$ switch to avoid loss of last line in .BAT file.
Added /sn switch to select files with no attributes.
Added SDB, SDD, and SDM batch files to browse output,
process multiple drives, and process multiple commands.
------------------------------------------------------------------------
8.3 Product Support
------------------------------------------------------------------------
This product represents more than a thousand hours of work over several
years. I believe it is a good example of the SHAREWARE concept; you
get to try the product without prior commitment and only chose to
support it if you find it useful. Many of the continuing improvements
have been implemented in response to user suggestions and requests.
If you find that you continue to use this product once you have become
familiar with it, it is obviously of some value to you; please support
the SHAREWARE concept by registering your copy and sharing the SD61.ARC
or SD61.ZIP file with other users.
The distribution file may be freely copied and distributed as long as
the only charge is for media and reproduction costs, etc. Under no
conditions should the program either be sold for a profit or distributed
in modified form without the permission of the author. Site and
Corporate licenses are available on request for use in corporate or
government organizations. The SITE.FRM file contains a Site License
Agreement Form. Special versions are available on request.
As supplied, the programs in this product are fully functional with no
missing or crippled features. However, the SHAREWARE concept is a two
way process. In order to keep the size of the distribution file
reasonable, and to encourage users to register their copy of this
product, the SDC configuration utility program is only available through
the mail when you register your copy of SD.
This easy-to-use program provides full screen color menus which allow
you to change any of the default sort options, screen colors, command
line switch values, or other program options in SD or SDR to the
defaults you prefer. Although you can also use the DOS DEBUG program to
make these changes by patching the SD or SDR files, SDC makes this
process much quicker and safer.
To register your copy of SD, please print and complete the order and
registration form contained in the file ORDER.FRM and return it together
with a contribution of $20. Use of the order form is optional; it is
simply included as a convenience to users. In return, you will receive
a disk containing the latest version of all of the SD utility programs,
including the SDC configuration program.
The full Assembly Language source code for the SD, SDR and VSN programs
and the BASIC Language source code for the SDC program is available on a
second disk for an additional $20. Obtaining this second disk will
enable you to see how the programs work, learn more about assembly
language programming, or make your own enhancements.
If you do improve the program, please let me know so that the results
can be shared with other users. I prefer to coordinate all changes so
that they are released in an orderly fashion. Full source code is
included with all Site Licenses.
A comprehensive DOS HELP utility is available separately which provides
quick, friendly access to complete DOS command reference information for
DOS 2.0-4.0. The DEMO2.BAT file provides a demonstration of some of the
capabilities of this product. The DOS HELP utility is also available
for a contribution of $20. Please specify whether you want the IBM
PC-DOS or ZENITH MS-DOS Version of the HELP Utility. Site Licenses are
also available for this product. This is not a SHAREWARE product and is
only available through the mail.
Even if you don't register or formally support these products, please
share copies of the distribution file with other users and/or upload
copies to Computer Bulletin Boards you use.
Users who have supported this product in the past are largely
responsible for the existence of the current version. Previously
registered users can receive the latest version of the SD Utility Disk
or DOS HELP Disk for a $10 contribution, at any time. I normally supply
5.25" 360Kb disks. If you prefer to receive 3.5" 720Kb disks, please
indicate this on the order form and add $2.50. If you are ordering 2 or
more disks and prefer to receive 5.25" 1.2Mb disks, please indicate this
on the order form (there is no extra charge). I can accept checks,
money orders and purchase orders.
If you wish to contact me with problem reports, suggestions for
improvements, and/or especially large financial donations, I can be
reached using the information provided below:
John F. Stetson (Home) (301) 946-5615 (8PM-11PM EST)
42 Tivoli Lake Court (Work) (301) 340-4544 (10AM-6PM EST)
Silver Spring, Md. 20906
------------------------------------------------------------------------
IBM and PC-DOS are trademarks of IBM Corporation.
MICROSOFT and MS-DOS are trademarks of Microsoft Corporation.
DESQview is a trademark of Quarterdeck Office Systems.
ARC is a trademark of SEA Corporation.
------------------------------------------------------------------------